//
//  FTInternationalizationManager.h
//  FTInternationalizationManager
//
//  Created by JackieYip on 2017/6/11.
//  Copyright © 2017年 mondial-d. All rights reserved.
//

#import <UIKit/UIKit.h>

#define kInternationalizationManager       ([FTInternationalizationManager sharedManager])

typedef NS_ENUM(NSInteger, FTLanguageIndex)
{
    FTLanguageIndex_cn,
    FTLanguageIndex_en
};

typedef NS_ENUM(NSInteger, FTCurrencyIndex)
{
    FTCurrencyIndex_CNY,    // 人民币
    FTCurrencyIndex_HKD,    // 港币
    FTCurrencyIndex_USD     // 美元
};

// app支持的电话国家代号：中国大陆、香港、澳门、台湾、新加坡、美国、加拿大、英国、法国、澳大利亚、日本
typedef NS_ENUM(NSInteger, FTPhoneLocaleIdex)
{
    FTPhoneLocaleIdex_CN,   // 中国大陆
    FTPhoneLocaleIdex_HK,   // 香港
    FTPhoneLocaleIdex_MO,   // 澳门
    FTPhoneLocaleIdex_TW,   // 台湾
    FTPhoneLocaleIdex_SG,   // 新加坡
    FTPhoneLocaleIdex_US,   // 美国
    FTPhoneLocaleIdex_CA,   // 加拿大
    FTPhoneLocaleIdex_GB,   // 英国
    FTPhoneLocaleIdex_FR,   // 法国
    FTPhoneLocaleIdex_AU,   // 澳大利亚
    FTPhoneLocaleIdex_JP,   // 日本
};

@interface FTInternationalizationManager : NSObject
@property (strong, nonatomic, readonly) NSLocale *languageLocale;
@property (strong, nonatomic, readonly) NSLocale *currencyLocale;
// app支持的语言：简体中文、英文
@property (strong, nonatomic, readonly) NSMutableArray *appSupportLanguages;
// app支持的货币：人民币、港币、美元（暂时不支持美元）
@property (strong, nonatomic, readonly) NSMutableArray *appSupportCurrencys;
@property (strong, nonatomic, readonly) NSString *appStoreArea;
@property (strong, nonatomic, readonly) NSString *countryLocaleIdentifier;
+(instancetype)sharedManager;
- (void)initAppLanguageOnResponse:(void (^)(FTLanguageIndex currentLanguageIndex))onResponse;
- (void)setAppLanguage:(NSString *)language isManuallySetup:(BOOL)isManuallySetup onResponse:(void (^)(BOOL shouldSetLanguageToRemoteServer, FTLanguageIndex currentLanguageIndex))onResponse;
- (void)setAppCurrency:(NSString *)currency isManuallySetup:(BOOL)isManuallySetup onResponse:(void (^)(BOOL shouldSetLanguageToRemoteServer, FTLanguageIndex currentLanguageIndex))onResponse;
- (void)setAppLanguage:(NSString *)language andAppCurrency:(NSString *)currency isManuallySetup:(BOOL)isManuallySetup onResponse:(void (^)(BOOL shouldSetLanguageToRemoteServer, FTLanguageIndex currentLanguageIndex))onResponse;

- (BOOL)isENLanguage;
- (BOOL)isCNLanguage;

@end
